<template>
	<view>
		<view style="margin-top: 60px;" id="pay">
		    <view style="width: 100%;">
		        <view id="zhuanzhang" style="width:250px;height:250px;margin:0 auto;">
		            <image :src="tupian" style="width:100%;height:100%;" id="payCode"/>
		        </view>
		        <view style="width:250px;height:30px;display:flex;margin:10px auto;">
		            <input placeholder="请输入转账金额" @input="onInput" type="number" id="money" style="width:200px;height:100%;background-color: white;padding-left: 20rpx;border: 1rpx #C0C4CC solid;" />
					<view style="width:50px;height:30px;background:green;text-align:center;line-height:30px;background:#19d619;color:white;font-size:12px;" @click="pay()">确定</view>
		        </view>
		    </view>
		    <br>
		    <view class="saoyisao">扫一扫在线转账！</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				zhuanzhangMoney:0,//转账金额
				tupian:"../../static/center/tishi.jpg",//提示图片或二维码图片
			}
		},
		methods: {
			onInput(e){
				this.zhuanzhangMoney=e.target.value;
			},
			pay(){
				if(this.zhuanzhangMoney > 0){
					this.tupian = this.host+"/apppay.do?p=qrcodexcx&jifen="+this.zhuanzhangMoney+"&userid="+uni.getStorageSync('usersId');
				}else{
					this.tupian = "../../static/center/tishi.jpg";
					this.$u.toast("转账金额不能小于0");
				}
			}
		}
	}
</script>

<style>
	.saoyisao{
		text-align: center;
		font-size: 17px;
		line-height: 21px;
		color: #000;
	}
</style>
